package com.comon.core.utils;

import lombok.extern.slf4j.Slf4j;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-08-27
 * Time:17:23
 * Text：
 */
@Slf4j
public class Slf4jUtils {
    public void doSomething(String msg) {
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        StackTraceElement element = stackTrace[1]; // 获取调用此方法的堆栈元素

        log.debug("Class: {}, Method: {}, Line: {} ,problem: {}", element.getClassName(), element.getMethodName(), element.getLineNumber(),msg);

        // 代码逻辑
    }
}
